import { NgModule } from '@angular/core';
import { EquipmentListComponent } from './equipment-list/equipment-list.component';
import { EquipmentManagementComponent } from './equipment-management.component';
import { Routes, RouterModule } from '@angular/router';
import { ShareModule } from 'app/shared/ShareModule';
import { NgZorroAntdModule } from 'ng-zorro-antd';
import { PublicComponentModule } from 'app/public';
import { AddEquipmentComponent } from './equipment-list/add-equipment/add-equipment.component';
import { PhotoEquipmentComponent } from './equipment-list/photo-equipment/photo-equipment.component';
import { EquipmentAlarmComponent } from './equipment-alarm/equipment-alarm.component';
import { EquipmentAlarmListComponent } from './equipment-alarm/equipment-alarm-list/equipment-alarm-list.component';
import { EquipmentAlarmHistoryComponent } from './equipment-alarm/equipment-alarm-history/equipment-alarm-history.component';
import { ReactiveFormsModule, FormsModule } from '@angular/forms';

const routes: Routes = [
    {
        path: '',
        component: EquipmentManagementComponent,
        children: [
            { path: '', redirectTo: 'equipment-list', pathMatch: 'full' },
            { path: 'equipment-list', component: EquipmentListComponent },
            { path: 'equipment-alarm', component: EquipmentAlarmComponent }
        ]
    }
];
@NgModule({
    imports: [ShareModule, NgZorroAntdModule, PublicComponentModule, RouterModule.forChild(routes), FormsModule, ReactiveFormsModule],
    declarations: [
        EquipmentManagementComponent,
        EquipmentListComponent,
        AddEquipmentComponent,
        PhotoEquipmentComponent,
        EquipmentAlarmComponent,
        EquipmentAlarmListComponent,
        EquipmentAlarmHistoryComponent
    ]
})
export class EquipmentManagementModule {}
